<?php

/**
 * ArticuloVenta form base class.
 *
 * @package    form
 * @subpackage articulo_venta
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 8807 2008-05-06 14:12:28Z fabien $
 */
class BaseArticuloVentaForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'venta_id'    => new sfWidgetFormInput(),
      'articulo_id' => new sfWidgetFormPropelSelect(array('model' => 'Articulo', 'add_empty' => true)),
      'cantidad'    => new sfWidgetFormInput(),
      'fecha'       => new sfWidgetFormDate(),
      'id'          => new sfWidgetFormInputHidden(),
    ));

    $this->setValidators(array(
      'venta_id'    => new sfValidatorInteger(array('required' => false)),
      'articulo_id' => new sfValidatorPropelChoice(array('model' => 'Articulo', 'column' => 'id', 'required' => false)),
      'cantidad'    => new sfValidatorInteger(array('required' => false)),
      'fecha'       => new sfValidatorDate(array('required' => false)),
      'id'          => new sfValidatorPropelChoice(array('model' => 'ArticuloVenta', 'column' => 'id', 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('articulo_venta[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'ArticuloVenta';
  }


}
